package com.bw.mallshop.timmer;

public
/**
 * @author Lishaohe
 * @description:
 * @date :2021/10/13 0013 下午 6:39
 *
 */
class TimeThread extends Thread{
    private TimeHandler handler;

    public TimeThread(TimeHandler handler) {
        this.handler = handler;
    }

    @Override
    public void run() {
        super.run();
        for (int i = 0; i < 3; i++) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            handler.sendEmptyMessage(0);
        }
        handler.sendEmptyMessage(1);
    }
}
